package com.wlps.service.impl;

import com.wlps.bo.OrderBO;
import com.wlps.bo.OrderInfo;
import com.wlps.controller.OrderCenter;
import com.wlps.entity.OrderRecord;
import com.wlps.service.IOrderRecordService;
import org.junit.Test;

import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicReference;

/**
 * <p>
 *
 * </p>
 *
 * @author ZWYZY
 * @since 2020/8/1
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class test {
 //    @Autowired
//    public RedisTemplate redisTemplate;
    @Resource
 OrderCenter orderCenter;

    @Test
    public void set(){
        List<OrderBO> orderBOS = new ArrayList<>();
        orderBOS.add(new OrderBO(7,1));
        OrderInfo orderInfo = new OrderInfo();
        orderInfo.setShippingAddress("地方");
        orderInfo.setRemark("未配送");
        orderInfo.setFundingInformation("未配送");
        orderInfo.setConsigneephone("ss");
        orderInfo.setReceiver("zy");
        orderInfo.setFinishDate(new Date());
        orderInfo.setClientId(1);
        orderInfo.setOperator(1);
        orderInfo.setOrders(orderBOS);
        orderCenter.addOrder(orderInfo.getOrders(),orderInfo);
    }

    public static void main(String[] args) {
        System.out.println("xx");
    }
}
